package com.broada.apm;

import com.broada.apm.utils.ConfigureProperties;

public final class ApmServer {

	public static final String USER_DIR = System.getProperty("user.dir");
    /**
     * MQ数据版本，通过-Dmq.version=1 2 3 4指定
     */
    public static final int MQ_VERSION = Integer.parseInt(System.getProperty("mq.version", "4"));
    /**
     * ZMQ监听端口，通过-Dzmq.port=5555指定，默认 5555
     */
    public static final int ZMQ_PORT = Integer.parseInt(System.getProperty("zmq.port", "5555"));
    /**
     * DISRUPTOR_BUFFER_SIZE 默认 2^16 = 65536, 通过 -Dring.buffer.size修改，注意数值要是2的n次幂
     */
    public static final int DISRUPTOR_BUFFER_SIZE = Integer.parseInt(System.getProperty("ring.buffer.size", "65536" ));
    /**
     *  协议分析器通讯地址
     */
    public static final String APM_PROTOCOL_HOST = System.getProperty("apm.protocol.host", "tcp://127.0.0.1:1108" );
    /**
     * L7 模块解压存放地址
     */
    public final static String L7_MODULE_DIR = USER_DIR + "/../" + ConfigureProperties.getString("apm.l7Module.dir", "conf/l7Module/");
    public final static String MODS_DIR = USER_DIR + "/../" + ConfigureProperties.getString("apm.mods.dir", "mods/");
    public final static String MSG_COPY_TO = System.getProperty("message.copy.to", "" );
    public final static int MAX_RECORD_DATA = Integer.parseInt(System.getProperty("max.record.data", "100000" ));
    public final static boolean DROP_ERROR_RESPONSE_TIME_PACKAGE = Boolean.parseBoolean(ConfigureProperties.getString("drop.error.response.time.package", "false" ));
    /**
     * 默认缺省应用系统id
     */
    public static final String APP_DEFAULT_ID = "default";
}
